<div class="i_login">
    <!--{if $_FANWE['uid'] > 0}-->
    <a href="/wxmessage.php?action=index" id="ntcNum2">你好，<b>{$_FANWE['user_name']}{if $_FANWE['user']['realname_shop'] == 1}<img style="height:1.2rem;vertical-align: middle;margin-left: 3px;" src="/public/medal/small/v{$_FANWE['user']['v2']}.jpg"/></span>{/if}</b></a>
    <a href="{u settings/personal}">{lang settings}</a>
    <a href="{u cp/yu}">余额(<?php echo intval($_FANWE['user']['rmb_yu']);?>元)</a>
    <a href="javascript:;" id="ntcNum">{lang message_tip}{if $_FANWE['user_notice']['all'] > 0}({$_FANWE['user_notice']['all']}){/if}</a>
    <a href="{u product/cart}" id="mycartwrap">购物车</a>
    <a href="{u user/logout}" >{lang logout}</a>
    <!--{else}-->
    <a href="{u user/login}"><em class="j_icon_login"></em>登录社区</a>
    <a href="{u user/register}"><em class="j_icon_reg"></em>邮箱注册</a>
    <!--{/if}-->
</div>
<div class="i_notice_box" id="ntcBox">
    <ul>
        <li>
            <a href="/wxmessage.php?action=index">我的微信<span id="num_7"></span></a>
        </li>
    <!--
      <li>
            <a href="{u u/talk uid=$_FANWE['uid']}">我发表的</a>
        </li>
        <li>
            <a href="{u u/comments uid=$_FANWE['uid']}">评论我的{if $_FANWE['user_notice'][3] >0}<span>({$_FANWE['user_notice'][3]})</span>{/if}</a>
        </li>
        <li>
            <a href="{u u/fans uid=$_FANWE['uid']}">关注我的{if $_FANWE['user_notice'][1] >0}<span>({$_FANWE['user_notice'][1]})</span>{/if}</a>
        </li>
        <li>
            <a href="{u u/atme uid=$_FANWE['uid']}">提到我的<span id="num_4">{if $_FANWE['user_notice'][4] >0}({$_FANWE['user_notice'][4]}){/if}</span></a>
        </li>
        <li>
            <a href="{u u/atme uid=$_FANWE['uid'],type=faved}">喜欢我的{if $_FANWE['user_notice'][2] >0}<span>({$_FANWE['user_notice'][2]})</span>{/if}</a>
        </li>
         -->
        <li>
            <a href="{u u/message uid=$_FANWE['uid']}">我的信件{if $_FANWE['user_notice'][5] >0}<span>({$_FANWE['user_notice'][5]})</span>{/if}</a>
        </li>
        <li>
            <a href="{u u/notic uid=$_FANWE['uid']}">我的通知<span id="num_6">{if $_FANWE['user_notice'][6] >0}({$_FANWE['user_notice'][6]}){/if}</span></a>
        </li>
        <li><a href="{u u/sysmsg uid=$_FANWE['uid']}">系统消息{if $_FANWE['user_notice'][7] >0}<span>({$_FANWE['user_notice'][7]})</span>{/if}</a></li>
    </ul>
</div>

<div class="i_notice_box2" id="ntcBox2">
    <ul>
        <li><a href="/wxmessage.php?action=index">我的微信</a></li>
        {if $_FANWE['user']['user_type'] == 1}
        <li><a href="/shareinfo.php?action=sorder">订单管理</a></li>
        <li><a href="/shareinfo.php?action=listart&anli=1">发布案例</a></li>
        <li><a href="/shareinfo.php?action=listart&anli=0">发布经验</a></li>
        <!-- <li><a href="/u.php?action=me">社区</a></li>
        <li><a href="/list.php?action=staff">人力资源管理</a></li>  -->
         {else}
      <!--   <li><a href="/list.php?action=robot">火锅君</a></li>
        <li><a href="/list.php?action=plan">进度表</a></li>
        <li><a href="/u.php?action=me">社区</a></li>
        <li><a href="/list.php?action=lists">清单</a></li>   -->
        {/if}
    </ul>
</div>
<script type="text/javascript">
function check_notice() {
    $.get('misc.php?action=checknotice', function(s) {
        var obj = eval('('+s+')');
        var nums = 0;
        for(var i in obj) {
            var notice = obj[i];
            var type = notice.type;
            var num = notice.num;
            if(num > 0) {
                $('#num_'+type).html('('+num+')');
                nums += num;
            }
        }
        if(nums > 0) {
            $('#ntcNum').html('消息('+num+')');
        }
    });
}

window.setInterval(check_notice, 10000);
</script>